package com.example.docmanagement.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.UUID;

/**
 * 文件查询请求 DTO
 * 支持分页、条件筛选、排序
 */
@Data
@Schema(description = "文件查询请求（分页 + 条件过滤）")
public class FileMetadataQueryRequest {

    @Schema(description = "当前页码（从1开始）", example = "1", defaultValue = "1", minimum = "1")
    private Integer page = 1;

    @Schema(description = "每页数量", example = "20", defaultValue = "20", minimum = "1", maximum = "100")
    private Integer pageSize = 20;

    @Schema(description = "Bucket 名称筛选", example = "doc-images")
    private String bucketName;

    @Schema(description = "文件类型筛选", example = "image")
    private String fileType;

    @Schema(description = "文件分类筛选", example = "doc-image")
    private String fileCategory;

    @Schema(description = "关联的文档 ID", example = "1001")
    private Long documentId;

    @Schema(description = "上传者用户 ID", example = "550e8400-e29b-41d4-a716-446655440000")
    private UUID uploadedBy;

    @Schema(description = "访问策略筛选", example = "public", allowableValues = { "public", "private", "authenticated" })
    private String accessPolicy;

    @Schema(description = "关键字（模糊匹配文件名、对象键）", example = "design")
    private String keyword;

    @Schema(description = "排序字段", example = "createdAt",
            allowableValues = { "createdAt", "updatedAt", "fileSize", "fileName" }, defaultValue = "createdAt")
    private String sortBy = "createdAt";

    @Schema(description = "排序方向", example = "desc", allowableValues = { "asc", "desc" }, defaultValue = "desc")
    private String sortOrder = "desc";
}

